<template>
    <el-menu
    :style="{width: '200px'}"
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="aside-content"
        default-active="2"
        text-color="#fff"
        @open="handleOpen"
        @close="handleClose"
      >
      <p class="logo-title">陪诊系统</p>

      <TreeMenu :menuData="menuData"/>
        
      </el-menu>
</template>

<script setup>
import TreeMenu from "./TreeMenu.vue"
import { useRouter } from 'vue-router'
import { reactive } from "vue"

const router = useRouter()
console.log(router, 'router')
const menuData = reactive(router.options.routes[0].children)

const handleOpen = () => { }
const handleClose = () => { }
</script>

<style scoped lang="less">
.aside-content {
    height: 100%;

    .logo-title {
        font-size: 20px;
        font-weight: bold;
        color: #fff;
        text-align: center;
        height: 50px;
        line-height: 50px;
    }
}
</style>
